package cn.nexd.app.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by wangxu on 16/3/16.
 */
public class MallModel implements Parcelable{

    private String cnCityName;
    private String pyCityName;
    private String mallName;
    private String pyName;
    private String mallId;
    private boolean isSelected = false;

    public MallModel(String cnCityName, String pyCityName, String mallName, String pyName, String mallId, boolean isSelected) {
        this.cnCityName = cnCityName;
        this.pyCityName = pyCityName;
        this.mallName = mallName;
        this.pyName = pyName;
        this.mallId = mallId;
        this.isSelected = isSelected;
    }

    public String getCnCityName() {
        return cnCityName;
    }

    public void setCnCityName(String cnCityName) {
        this.cnCityName = cnCityName;
    }

    public String getPyCityName() {
        return pyCityName;
    }

    public void setPyCityName(String pyCityName) {
        this.pyCityName = pyCityName;
    }

    public String getMallName() {
        return mallName;
    }

    public void setMallName(String mallName) {
        this.mallName = mallName;
    }

    public String getPyName() {
        return pyName;
    }

    public void setPyName(String pyName) {
        this.pyName = pyName;
    }

    public String getMallId() {
        return mallId;
    }

    public void setMallId(String mallId) {
        this.mallId = mallId;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setIsSelected(boolean isSelected) {
        this.isSelected = isSelected;
    }

    public MallModel() {
    }

    protected MallModel(Parcel in) {
        cnCityName = in.readString();
        pyCityName = in.readString();
        mallName = in.readString();
        pyName = in.readString();
        mallId = in.readString();
        isSelected = in.readByte() != 0;
    }

    public static final Creator<MallModel> CREATOR = new Creator<MallModel>() {
        @Override
        public MallModel createFromParcel(Parcel in) {
            return new MallModel(in);
        }

        @Override

        public MallModel[] newArray(int size) {
            return new MallModel[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(cnCityName);
        dest.writeString(pyCityName);
        dest.writeString(mallName);
        dest.writeString(pyName);
        dest.writeString(mallId);
        dest.writeByte((byte) (isSelected ? 1 : 0));
    }
}
